﻿using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using QuickPasteToolWeb.Command;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace QuickPasteToolWeb.ViewModel
{
    public class TaskbarIconViewModel : ObservableObject
    {
        private SettingWindow _settingWindow;
        public TaskbarIconViewModel(SettingWindow settingWindow)
        {
            _settingWindow = settingWindow;
        }

        public DelegateCommand NotifyCommand
        {
            get
            {
                return new DelegateCommand((type) =>
                {
                    if (type.ToString() == "0")
                    {
                        SetApplication();
                    }
                    //if (type.ToString() == "1")
                    //{
                    //    Application.Current.MainWindow.Show();
                    //    Application.Current.MainWindow.Activate();
                    //}
                    if (type.ToString() == "99")
                        Application.Current.Shutdown();
                });
            }
        }

        private void SetApplication()
        {
            _settingWindow.ShowDialog();
        }
    }
}
